/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2023-04-12
 * Time: 14:25
 */
public class Separate {
    public static void main(String[] args) {
        String str = "1a2b3c";
        char[] c = str.toCharArray();
        for (int i = 0; i < c.length; i++) {
            if(c[i] >= '0' && c[i] <= '9'){
                System.out.print(c[i]+"");
            }
        }
        System.out.println();
        for (int j = 0; j< c.length; j++) {
            if((c[j] >= 'A' && c[j] <= 'Z') || (c[j] >= 'a' && c[j] <= 'z')){
                System.out.print(c[j]+"");
            }
        }
    }
}
